home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 43
/
Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso
/
-serious-
/
comms
/
other
/
magicfile
/
viruszfilecheck.rx
< prev
next >
Wrap
Text File
|
1999-06-14
|
2KB
|
62 lines
/*
$VER: MagicFile 4.5 VirusZ Virus Checker AREXX ©1997 Steve Clack 1.3
This may be freely distributed and mutated!
Template: FileCheck.rx <no arguments yet>
If VirusZ is not running, it will be started from the script.
*/
Prog_VirusZ = "SYS:System/VirusZ/VirusZ" /* << Change this to where your VirusZ is! */
options results
options failat 99
if ~show(ports,VIRUSZ_II.REXX) then do
address command Prog_VirusZ
StartTime = time(seconds)
do while ~show(ports,VIRUSZ_II.REXX)
if time(seconds) - StartTime > 20 then do
address command 'Echo >>BBS:Logfiles/MFVirusLog.text "'Time()' 'Date()' serious problem occoured:"'
address command 'Echo >>BBS:Logfiles/MFVirusLog.text "Failed to load VirusZ! Files have been untouched!*n"'
exit
end
end
end
call open(checkfile,'T:MFCheckQueue',R)
DO UNTIL EOF(checkfile)
Line = READLN(checkfile)
IF UPPER(WORD(Line,1)) = "%" THEN DO
USERNAME = READLN(checkfile)
DESTPATH = READLN(checkfile)
Line = READLN(checkfile)
END
IF Line ~= "" then do
address VIRUSZ_II.REXX CHECKFILE Line DECREXEC DECRDATA USEEXTERN EXTRACT
status = rc
if status=10 then do
address command 'Echo >>BBS:Logfiles/MFVirusLog.text "'Time()' 'Date()' serious problem occoured:"'
address command 'Echo >>BBS:Logfiles/MFVirusLog.text "Failed to virus check >'Line'< uploaded by 'USERNAME'!*n"'
address command 'Copy CLONE >nil: 'Line' 'DESTPATH
end
if status=0 then do
address command 'Copy CLONE >nil: 'Line' 'DESTPATH
end
if status=5 then do
address command 'Echo >>BBS:Logfiles/MFVirusLog.text "'Time()' 'Date()' incident occoured:"'
address command 'Echo >>BBS:Logfiles/MFVirusLog.text "'USERNAME' uploaded virus infected >'Line'< - file nuked!*n"'
end
address command 'Delete >nil: 'Line
END
END
call close checkfile
address command 'Delete >nil: T:MFCheckQueue'
exit